<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登陆</title>
    <div th:replace="common_cssjs"></div>
    <link type="text/css" rel="stylesheet" media="screen" th:href="@{/css/login.css}">
    <script th:src="@{/js/login.js}" type="text/javascript"></script>

</head>

<body>
<div th:replace="common/header::nav"></div>
<div class="container">
    <form action="#" th:action="@{/user/login}" method="post"
          id="loginForm" class="form-signin">

        <h2 class="form-signin-heading">系统登录</h2>

         <div th:unless="${#httpServletRequest.getParameter('errorPwd')==null}">
             <div id="errorPwd" class="alert alert-success">用户密码错误...</div>
             <script type="text/javascript">
                 setTimeout(function () {
                     $('#errorPwd').hide('slow');
                 }, 3000);
             </script>
         </div>

        <div th:unless="${#httpServletRequest.getParameter('error')==null}">
            <div id="error" class="alert alert-success">未登录或会话失效...</div>
            <script type="text/javascript">
                setTimeout(function () {
                    $('#error').hide('slow');
                }, 3000);
            </script>
        </div>

        <div class="form-group">
            <input type="text" class="form-control" name="username" placeholder="账号" required autofocus>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="password" placeholder="密码" required>
        </div>
        <div class="form-group">
            <label class="checkbox">
                <input type="checkbox" value="remember-me">自动登陆
            </label>
        </div>
        <div class="form-group">
            <button class="btn btn-lg btn-primary btn-block" type="submit">登陆</button>
        </div>

    </form>


    <!--<form:form>
        &lt;!&ndash; 自动隐藏提示信息 &ndash;&gt;
        <c:if test="${not empty param.errorPwd}">
            <div id="errorPwd" class="alert alert-success">用户密码错误...</div>
            &lt;!&ndash; 自动隐藏提示信息 &ndash;&gt;
            <script type="text/javascript">
                setTimeout(function () {
                    $('#errorPwd').hide('slow');
                }, 5000);
            </script>
        </c:if>
        &lt;!&ndash; 自动隐藏提示信息 &ndash;&gt;

        <h2 class="form-signin-heading">系统登录</h2>

        <div class="form-group">
            <input type="text" class="form-control" name="username" placeholder="账号" required autofocus>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="password" placeholder="密码" required>
        </div>
        <div class="form-group">
            <label class="checkbox">
                <input type="checkbox" value="remember-me">自动登陆
            </label>
        </div>
        <div class="form-group">
            <button class="btn btn-lg btn-primary btn-block" type="submit">登陆</button>
        </div>

    </form:form>-->
</div>
<!-- /container -->

</body>
</html>